<template>
  <div>
    <label v-for="r in pval">
      <input type="checkbox" v-model="val" :value="r.value">{{ r.label}}
    </label>
  </div>
</template>

<script>
export default {
  name: 'Child4',
  data() {
    return {
      val: this.defVal
    }
  },
  props: {
    pval: {
      type: Array,
      default: () => []
    },
    defVal: {
      type: Array,
    }
  },
  watch: {
    val(nval) {
      this.$emit("input", nval)
    }
  }
}
</script>

<style scoped lang="scss">

</style>
